<include file="Public:header" />
    <div class="container-fluid">
        <div class="row">
           <include file="Public:sidebar" />
            <div class="col-sm-11  col-md-10 main">
                <h1 class="page-header">话题列表</h1>
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>标题</th>
                            <th>作者</th>
                            <th>创建时间</th>
                            <td>回复列表</td>
                            <td>推荐</td>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <volist name="topics.data" id="topic">
                        <tr>
                            <td>{$topic.tid}</td>
                            <td><a href="{:U('home/topic/detail', array('tid'=>$topic['tid']))}" target="_blank">{$topic.subject}</a></td>
                            <td>{$topic.username}</td>
                            <td>{:friendly_date($topic['create_time'])}</td>
                            <td><a href="{:U('topic/posts',array('tid'=>$topic['tid']))}">查看回复</a></td>
                            <td>
                                <eq name="topic.is_stick" value="1">
                                    <a href="{:U('topic/unstick',array('tid'=>$topic['tid']))}">取消推荐</a>
                                <else/>
                                    <a href="{:U('topic/stick',array('tid'=>$topic['tid']))}">推荐</a>
                                </eq>
                            </td>
                            <td>
                                <a href="{:U('topic/del',array('tid'=>$topic['tid']))}"><i class="fa fa-trash-o"></i></a>
                            </td>
                        </tr>
                        </volist>
                    </tbody>
                </table>
                <div class="text-center">
                    {$topics.page}
                </div>
            </div>
        </div>
    </div>
<include file="Public:footer" />
